//
//  HEOrderAddAddressCell.m
//  HealthFamily
//
//  Created by 吴欧 on 2020/10/28.
//  Copyright © 2020 honglutec. All rights reserved.
//

#import "HEOrderAddAddressCell.h"

@interface HEOrderAddAddressCell ()

@property(nonatomic, strong) UILabel *titleLb;
@property(nonatomic, strong) UIImageView *arrowView;
@property(nonatomic, strong) UIImageView *addImgView;

@end

@implementation HEOrderAddAddressCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
     if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
         self.backgroundColor = [UIColor clearColor];
         self.selectionStyle = UITableViewCellSelectionStyleNone;
          [self initUI];
     }
     return self;;
 }

- (void)initUI {
 
    _titleLb = [UILabel new];
    _titleLb.font = DYBlodFont(16);
    _titleLb.text = @"添加上门服务地址";
    _titleLb.textColor = CNavBgColor;
    [self.contentView addSubview:_titleLb];
    
    _addImgView = [UIImageView new];
    _addImgView.contentMode = UIViewContentModeScaleAspectFill;
    _addImgView.image = IMAGE_NAMED(@"add");
    [self.contentView addSubview:_addImgView];
    
    _arrowView = [UIImageView new];
    _arrowView.contentMode = UIViewContentModeScaleAspectFill;
    _arrowView.image = IMAGE_NAMED(@"go_gray");
    [self.contentView addSubview:_arrowView];
    
    [_arrowView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerY.equalTo(self.contentView);
        make.right.equalTo(self.contentView).mas_offset(-15);
        make.width.mas_offset(8);
        make.height.mas_offset(12);
    }];
    
    [_addImgView mas_makeConstraints:^(MASConstraintMaker *make) {
       make.centerY.equalTo(self.contentView);
       make.left.equalTo(self.contentView).mas_offset(15);
       make.width.mas_offset(20);
       make.height.mas_offset(20);
    }];
    
    [_titleLb mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(_addImgView.mas_right).mas_offset(10);
        make.right.equalTo(_arrowView.mas_left).mas_offset(-15);
        make.top.equalTo(self.contentView).mas_offset(15);
        make.bottom.equalTo(self.contentView).mas_offset(-15);
    }];
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
